//
//  UIView+autolayout.m
//  ios66666
//
//  Created by wangfuren on 14-9-16.
//  Copyright (c) 2014年 lichentao. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "UIView+autolayout.h"

@implementation UIView (autolayout)

- (void)autoLayouts111SubView:(UIView *)subView{
    NSDictionary *views = NSDictionaryOfVariableBindings(subView);
    
    [self addConstraints:
     [NSLayoutConstraint constraintsWithVisualFormat:@"H:|-(>=50)-[label(100)]"
                                             options:0
                                             metrics:nil
                                               views:views]];
    
    [self addConstraints:
     [NSLayoutConstraint constraintsWithVisualFormat:@"V:|-(>=100)-[label(50)]"
                                             options:0
                                             metrics:nil
      
      
                                               views:views]];
}
@end
